<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline" action="{:url('Auth/adminList')}">
            <a class="btn btn-flat btn-primary m_10" href="{:url('Auth/adminList')}">显示全部</a>
            <a class="btn btn-flat btn-success m_10 f_r m_t_5" onclick="javascript :history.back(-1)"><i
                    class="fa fa-undo m-r-10"></i>返 回</a>
        </form>
    </div>
    <!--数据表开始-->
    <div class="row">
        <div class="col-xs-12">
            <div class="box box-body">
                {if $info}
                <form method="post" action="{:url('Auth/adminEdit')}">
                    <input type="hidden" name="id" value="{$info.id}"/>
                    {else /}
                    <form method="post" action="{:url('Auth/adminAdd')}">
                        {/if}
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">角色组</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <select name="group_id" class="form-control">
                                        <option value="">请选择角色组</option>
                                        {volist name="authGroup" id="vo"}
                                        {if $info}
                                        <option {if $info[
                                        'group_id']==$vo.id}selected{/if} value="{$vo.id}">{$vo.title}</option>
                                        {else /}
                                        <option value="{$vo.id}">{$vo.title}</option>
                                        {/if}
                                        {/volist}
                                    </select>
                                </div>
                                <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts"> *</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">用户名</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="username" class="form-control" placeholder="请输入登录用户名"
                                           value="{$info.username}">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 用户名在4到25个字符之间。</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">密 码</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <input type="password" name="password" class="form-control" placeholder="请输入登录密码">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">* 密码在6到25个字符之间。</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">头像</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="image" class="form-control" placeholder="请点击按钮上传或手动输入地址"
                                           value="{$info.image}">
                                </div>
                                <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                    <!--上传图片-->
                                    <!--用来存放item-->
                                    <div id="fileList_image" class="uploader-list">
                                    </div>
                                    <div id="filePicker_image"><i class="fa fa-upload m-r-10"></i>选择图片</div>
                                    <img class="image_preview"
                                         src="{$info['image']?$info['image']:'/static/admin/images/nopic.png'}"
                                         id="image_preview">
                                    <!--上传图片-->
                                </div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">昵 称</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <input type="text" name="nickname" class="form-control" placeholder="请输入昵称"
                                           value="{$info.nickname?$info.nickname:''}">
                                </div>
                                <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">*</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">状态</label>
                                <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                    <div class="dd_radio_lable_left">
                                        {if $info}
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="1" class="dd_radio" {$info.status?'checked':''}><span>启用</span>
                                        </label>
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="0" class="dd_radio" {$info.status?'':'checked'}><span>禁用</span>
                                        </label>
                                        {else /}
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="1" class="dd_radio" checked><span>启用</span>
                                        </label>
                                        <label class="dd_radio_lable">
                                            <input type="radio" name="status" value="0" class="dd_radio"><span>禁用</span>
                                        </label>
                                        {/if}
                                    </div>
                                </div>
                                <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">*</div>
                            </div>
                        </div>
                        <!---->
                        <div class="row dd_input_group">
                            <div class="form-group">
                                <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                    <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                    <button type="button" class="btn btn-flat btn-default"
                                            onclick="javascript :history.back(-1)">返 回
                                    </button>
                                </div>

                            </div>
                        </div>
                    </form>
            </div>
            <!-- /.box -->
        </div>
    </div>
    <!--数据表结束-->
</section>
<!--内容结束-->

<script>
    webupload('fileList_image', 'filePicker_image', 'image_preview', 'image');
</script>